package com.weiqiao.report.distributior.Service;


import java.util.List;
import java.util.Map;

import com.weiqiao.report.distributior.domain.DistributionStatisticsEntity;
import com.weiqiao.report.distributior.domain.ReturnDistributionStatisticsEntity;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;

/**
* @author PEI
* @date 2020-08-10
*/
public interface DistributionStatisticsService {


    /**
     * 聚合管道进行统计
     * @param company_id
     * @param filter
     * @param page
     * @param limit
     * @return
     */
    ReturnDistributionStatisticsEntity statisticsResultList(int company_id, Bson filter, int page, int limit);

    /**
    * 条件统计
    * @param company_id
    * @param filter
    * @return
    */
    int countNum(int company_id, Bson filter);

    /**
    * 分页查询热点列表
    * @param company_id
    * @param filter
    * @param pageable
    * @return
    */
    List<DistributionStatisticsEntity> findList(int company_id, Bson filter, Pageable pageable);

    /**
    * 获取详情
    * @param companyId
    * @param filter
    * @return
    */
    DistributionStatisticsEntity getEntity(int companyId, Bson filter);


    /**
    * 添加一条
    * @param company_id
    * @param json
    * @return
    */
    boolean addInfo(int company_id, String json);

    /**
    * 更新
    * @param company_id
    * @param filter
    * @param doc
    * @return
    */
    boolean updateInfo(int company_id, Bson filter, Document doc);
}